﻿#ifndef QOCHATWIDGET_H
#define QOCHATWIDGET_H

/**
* @file qochatwidget.h
* @describe 聊天对话框
* @author gaoyuelong
* @date 2021/11/23
*/

#include <QWidget>

enum E_WHOSAY {
    eMe,
    eFriend
};

namespace Ui {
class QoChatWidget;
}

class QoChatWidget : public QWidget
{
    Q_OBJECT

public:
    explicit QoChatWidget(QWidget *parent = 0);
    ~QoChatWidget();

    bool eventFilter(QObject *, QEvent *);

    void setToAccount(const QString &strToAccount);

private slots:
    void on_btnSend_clicked();
    void slotUpdateMsg(const QString &);
    void slider();

private:
    void formatMsg(E_WHOSAY, QString &strMsg);
    void loadHistoryMsg();//加载历史记录

private:
    Ui::QoChatWidget *ui;

    QString strToAccount;
};

#endif // QOCHATWIDGET_H
